<div id="editQuestionAnswerTitleModel" class="modal fade" tabindex="-1" role="dialog"
     aria-labelledby="exampleModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-body">
                <h3 class="m-t-none m-b ">
                    <span><vc:i18n name="修改" namespace="editQuestionAnswerTitle"></vc:i18n></span>
                </h3>
                <div class="ibox-content">
                    <div>
                        <div>
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label">
                                    <span><vc:i18n name="题目类型" namespace="editQuestionAnswerTitle"></vc:i18n></span>
                                </label>
                                <div class="col-sm-10">
                                    <select class="custom-select" v-model="editQuestionAnswerTitleInfo.titleType"
                                            @change="_changeEditTitleType()">
                                        <option selected disabled value="">
                                            {{vc.i18n('必填','editQuestionAnswerTitle')}}，请选择题目类型
                                        </option>
                                        <option value="1001">{{vc.i18n('单选','editQuestionAnswerTitle')}}</option>
                                        <option value="2002">{{vc.i18n('多选','editQuestionAnswerTitle')}}</option>
                                        <option value="3003">{{vc.i18n('简答题','editQuestionAnswerTitle')}}</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label">
                                    <span><vc:i18n name="问卷题目" namespace="editQuestionAnswerTitle"></vc:i18n></span>
                                </label>
                                <div class="col-sm-10">
                                    <input v-model="editQuestionAnswerTitleInfo.qaTitle" type="text"
                                           :placeholder="vc.i18n('必填，请填写问卷题目','editQuestionAnswerTitle')"
                                           class="form-control">
                                </div>
                            </div>
                            <div class="form-group row" v-if="editQuestionAnswerTitleInfo.titleType != '3003'"
                                 v-for="(item,index) in editQuestionAnswerTitleInfo.titleValues">
                                <label class="col-sm-2 col-form-label">
                                    <span><vc:i18n name="选项" namespace="editQuestionAnswerTitle"></vc:i18n></span>{{item.seq}}
                                </label>
                                <div class="col-sm-8">
                                    <input v-model="item.qaValue" type="text"
                                           :placeholder="vc.i18n('必填，请填写选项内容','editQuestionAnswerTitle')"
                                           class="form-control">
                                </div>
                                <div class="col-sm-2" v-if="index == editQuestionAnswerTitleInfo.titleValues.length-1">
                                    <button class="btn btn-link float-right" type="button"
                                            v-on:click="_addEditTitleValue()">
                                        <span><vc:i18n name="增加选项" namespace="editQuestionAnswerTitle"></vc:i18n></span>
                                    </button>
                                </div>
                                <div class="col-sm-2" v-else>
                                    <button class="btn btn-link float-right" type="button"
                                            v-on:click="_deleteEditTitleValue(item.seq)">
                                        <span><vc:i18n name="删除选项" namespace="editQuestionAnswerTitle"></vc:i18n></span>
                                    </button>
                                </div>
                            </div>
                            <div class="form-group row">
                                <label class="col-sm-2 col-form-label">
                                    <span><vc:i18n name="顺序" namespace="editQuestionAnswerTitle"></vc:i18n></span>
                                </label>
                                <div class="col-sm-10">
                                    <input v-model="editQuestionAnswerTitleInfo.seq" type="text"
                                           :placeholder="vc.i18n('必填，请填写顺序','editQuestionAnswerTitle')"
                                           class="form-control">
                                </div>
                            </div>
                            <div class="ibox-content">
                                <button class="btn btn-primary float-right" type="button"
                                        v-on:click="editQuestionAnswerTitle()">
                                    <i class="fa fa-check"></i>&nbsp;保存
                                </button>
                                <button type="button" class="btn btn-warning float-right" style="margin-right:20px;"
                                        data-dismiss="modal">
                                    <span><vc:i18n name="取消" namespace="editQuestionAnswerTitle"></vc:i18n></span>
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
